<template>
  <div class="download-card" @click="isShow = !isShow">
    <i class="iconfont icon-shouji"></i>
    <span>下载APP</span>
  </div>
  <div class="bar" v-if="isShow">
    <header>
      <h3>移动端</h3>
      <i class="iconfont icon-delete" @click="isShow = false"></i>
    </header>
    <div class="content">
      <img src="/bannerQrcode-1.png" />
      <h3>扫码下载 高德地图</h3>
      <span>高德地图 哪儿都熟</span>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'
const isShow = ref(false)
</script>

<style lang="scss" scoped>
.download-card {
  position: fixed;
  top: 10px;
  right: 80px;
  height: 50px;
  background: #fff;
  padding: 10px;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  cursor: pointer;
  color: #555;
  &:hover {
    color: #aaa;
  }
}
.bar {
  position: fixed;
  width: 267px;
  height: 204px;
  top: 80px;
  right: 80px;
  background: #fff;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  // justify-content: space-between;
  align-items: center;
  header {
    padding: 10px;
    position: relative;
    h3 {
      color: #1a66ff;
    }
    i {
      position: absolute;
      top: 10px;
      right: -80px;
      font-size: 16px;
      cursor: pointer;
      color: #aaa;
    }
  }
  .content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    img {
      width: 70px;
      height: 70px;
      margin: 20px;
    }
    span {
      font-size: 14px;
      color: #555;
      margin-top: 10px;
    }
  }
}
</style>
